home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload Trio 2
/
Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO
/
dir36
/
alrmck29.zip
/
ACINST.CMD
next >
Wrap
OS/2 REXX Batch file
|
1993-09-16
|
4KB
|
131 lines
/* */
call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
call SysLoadFuncs
call SysCls
pos = SysCurPos(5,0)
say 'Enter the target drive and directory then press <ENTER>'
PULL targdrv
say ' '
say 'Enter the source drive and directory then press <ENTER>'
PULL srcepath
say ' '
say 'Installing Alarm Clock in 'targdrv
call STARTINSTALL
call INSTALRMCLK
if UpGrade = 1 then call DBUPGRADE
say ' '
say '┌───────────────────────────────────────────┐'
say '│ │'
say '│ Alarm Clock INSTALLED │'
say '│ │'
say '│ Be sure that the selected directory is in │'
say '│ your LIBPATH= statement or .\ is in the │'
say '│ LIBPATH. See your CONFIG.SYS file. │'
say '│ │'
say '└───────────────────────────────────────────┘'
exit
STARTINSTALL:
call SysFileTree srcepath, 'file', 'D'
if file.0 = 0 then do
say 'Incorrect diskette in drive 'srcepath
exit
end
call SysFileTree targdrv, 'file', 'D'
if file.0 = 0 then do
UpGrade = 0
call CREATEPATH
end /* Do */
else
UpGrade = 1
return /* STARTINSTALL */
INSTALRMCLK:
"@echo off"
copy srcepath'\*.* 'targdrv
settings='PROGTYPE=PM;EXENAME='targdrv'\ALRMCLK2.EXE;OBJECTID=<ALRMCLK2>;STARTUPDIR='targdrv
call SysCreateObject 'WPProgram', 'Alarm Clock', '<WP_DESKTOP>', settings, 'REPLACE'
echo on
return
DBUPGRADE:
do I = 1 to 5 by 1
say ' '
say 'Do you want ACINST to run the Database Upgrade Utility?'
say 'Press Y for yes or N for no'
rc = SysGetKey()
say ' '
say ' '
select
when rc = 'Y' then do
targd = substr(targdrv, 1, 2)
Lngth = length(targdrv)
Lngth = Lngth - 2
targp = substr(targdrv, 3, Lngth)
targd
cd targp
"apupgrad"
return
end /* Do */
when rc = 'y' then do
targd = substr(targdrv, 1, 2)
Lngth = length(targdrv)
Lngth = Lngth - 2
targp = substr(targdrv, 3, Lngth)
targd
cd targp
"apupgrad"
return
end /* Do */
when rc = 'N' then return
when rc = 'n' then return
otherwise beep(454, 100)
end /* select */
end /* do */
return
CREATEPATH:
do I = 1 to 5 by 1
say ' '
say 'Press Y to create the directory 'targdrv
say 'Press N to end the install'
rc = SysGetKey()
say ' '
say ' '
select
when rc = 'Y' then do
rc = SysMkDir(targdrv)
if rc \= 0 then do
say 'Error Creating 'targdrv
say 'Install Ended unsuccessfully'
beep(454, 100)
exit
end
leave
end /* Do */
when rc = 'y' then do
rc = SysMkDir(targdrv)
if rc \= 0 then do
say 'Error Creating 'targdrv
say 'Install Ended unsuccessfully'
beep(454, 100)
exit
end
leave
end /* Do */
when rc = 'N' then leave
when rc = 'n' then leave
otherwise beep(454, 100)
end /* select */
end /* do */
return /* CREATEPATH */